//
//  ViewController.swift
//  unZipImg
//
//  Created by dfpo on 2021/1/24.
//

import Cocoa

import ZIPFoundation
import xUtils
import xViews

private func getLibBundle() -> Bundle? {
    let fb = Bundle(for: iOSReNameVC.self)
    guard let path = fb.path(forResource: "imgZipReName", ofType: "bundle") else {
        return nil
    }
    return Bundle(path: path)
    
}
private func getImg(_ imgName: String?) -> NSImage? {
    guard let imgName = imgName else {
        return nil
    }
    return getLibBundle()?.image(forResource: imgName)
}

public class iOSReNameVC: NSViewController {
    
    public static func vc() -> iOSReNameVC {
        return iOSReNameVC(nibName: "iOSReNameVC", bundle: getLibBundle())
    }
    
    @IBOutlet weak var icon: NSImageView!
    
    public override func viewDidLoad() {
        super.viewDidLoad()
 
        icon.image = getImg("test")
    
    
    }
}
